<!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="theme-color" content="#0078E7"><meta name="author" content="呆航"><meta name="copyright" content="呆航"><meta name="generator" content="Hexo 5.2.0"><meta name="theme" content="hexo-theme-yun"><title>阿里云云服务器配置网页教程 | 呆航的小站</title><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@900&amp;display=swap" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/star-markdown-css@0.1.25/dist/yun/yun-markdown.min.css"><script src="//at.alicdn.com/t/font_1140697_dxory92pb0h.js" async></script><script src="https://cdn.jsdelivr.net/npm/scrollreveal/dist/scrollreveal.min.js" defer></script><script>function initScrollReveal() {
  [".post-card",".post-content img"].forEach((target)=> {
    ScrollReveal().reveal(target);
  })
}
document.addEventListener("DOMContentLoaded", initScrollReveal);
document.addEventListener("pjax:success", initScrollReveal);
</script><link id="light-prism-css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@latest/themes/prism.css" media="(prefers-color-scheme: light)"><link id="dark-prism-css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@latest/themes/prism-tomorrow.css" media="(prefers-color-scheme: dark)"><link rel="icon" type="image/svg+xml" href="/yun.svg"><link rel="mask-icon" href="/yun.svg" color="#0078E7"><link rel="preload" href="/css/hexo-theme-yun.css" as="style"><link rel="preload" href="/js/utils.js" as="script"><link rel="preload" href="/js/hexo-theme-yun.js" as="script"><link rel="prefetch" href="/js/sidebar.js" as="script"><link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin><script id="yun-config">
    const Yun = window.Yun || {};
    window.CONFIG = {"hostname":"lqh827821562.gitee.io","root":"/","title":"呆航的小站","version":"1.7.0","mode":"auto","copycode":true,"page":{"isPost":true},"i18n":{"placeholder":"搜索...","empty":"找不到您查询的内容: ${query}","hits":"找到 ${hits} 条结果","hits_time":"找到 ${hits} 条结果（用时 ${time} 毫秒）"},"anonymous_image":"https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/avatar/none.jpg","say":{"api":"https://v1.hitokoto.cn","hitokoto":true},"algolia":{"appID":"E0XRZBP9EC","apiKey":"014277189b8673da64c5c3a931019c0e","indexName":"blog","hits":{"per_page":10}},"fireworks":{"colors":["102, 167, 221","62, 131, 225","33, 78, 194"]}};
  </script><link rel="stylesheet" href="/css/hexo-theme-yun.css"><script src="/js/utils.js"></script><script src="/js/hexo-theme-yun.js"></script><link rel="alternate" href="/atom.xml" title="呆航的小站" type="application/atom+xml"><link rel="preconnect" href="https://www.google-analytics.com" crossorigin><script async src="https://www.googletagmanager.com/gtag/js?id=UA-121354150-1"></script><script>if (CONFIG.hostname === location.hostname) {
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-121354150-1');
}</script><script data-ad-client="ca-pub-2245427233262012" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><script>(function(){
  var bp = document.createElement('script');
  var curProtocol = window.location.protocol.split(':')[0];
  if (curProtocol === 'https') {
    bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
  }
  else {
    bp.src = 'http://push.zhanzhang.baidu.com/push.js';
  }
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(bp, s);
})();</script><!-- Google Tag Manager --><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-M9KWR9L');</script><!-- End Google Tag Manager --><meta name="description" content="阿里云有新人优惠，刚注册的账号租用服务器一年才不到100元，正好拿来部署一下个人网页操作系统：ubuntu先用SecureCRT(只要是远程链接就行，Xshell等也可以用)远程连接上服务器##下载apache好像不能直接安装httpd,那么先安装apache2试试这个错误时因为libgd3出了点问题，使用命令apt-get --fix-broken install 结果又报错了经过查询后找到错误">
<meta property="og:type" content="article">
<meta property="og:title" content="阿里云云服务器配置网页教程">
<meta property="og:url" content="http://lqh827821562.gitee.io/%E9%98%BF%E9%87%8C%E4%BA%91%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%85%8D%E7%BD%AE%E7%BD%91%E9%A1%B5%E6%95%99%E7%A8%8B/index.html">
<meta property="og:site_name" content="呆航的小站">
<meta property="og:description" content="阿里云有新人优惠，刚注册的账号租用服务器一年才不到100元，正好拿来部署一下个人网页操作系统：ubuntu先用SecureCRT(只要是远程链接就行，Xshell等也可以用)远程连接上服务器##下载apache好像不能直接安装httpd,那么先安装apache2试试这个错误时因为libgd3出了点问题，使用命令apt-get --fix-broken install 结果又报错了经过查询后找到错误">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/28/5qaSHK.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/28/5qdBo8.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/28/5qd2yn.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/28/5LQ3fx.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/28/5LQ4Nn.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/28/5LGlzq.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/28/5LGoOf.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/28/5LBSXj.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/29/5OLxqH.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/29/5OOPit.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/10/29/5OLqG6.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/11/16/IWluZR.png">
<meta property="og:image" content="https://z3.ax1x.com/2021/11/16/IWlcLj.png">
<meta property="article:published_time" content="2021-10-28T04:32:38.000Z">
<meta property="article:modified_time" content="2021-11-16T14:48:50.034Z">
<meta property="article:author" content="呆航">
<meta property="article:tag" content="problem">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://z3.ax1x.com/2021/10/28/5qaSHK.png"><script src="/js/ui/mode.js"></script></head><body><script defer src="https://cdn.jsdelivr.net/npm/animejs@latest"></script><script defer src="/js/ui/fireworks.js"></script><canvas class="fireworks"></canvas><div class="container"><a class="sidebar-toggle hty-icon-button" id="menu-btn"><div class="hamburger hamburger--spin" type="button"><span class="hamburger-box"><span class="hamburger-inner"></span></span></div></a><div class="sidebar-toggle sidebar-overlay"></div><aside class="sidebar"><script src="/js/sidebar.js"></script><ul class="sidebar-nav"><li class="sidebar-nav-item sidebar-nav-toc hty-icon-button sidebar-nav-active" data-target="post-toc-wrap" title="文章目录"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-list-ordered"></use></svg></li><li class="sidebar-nav-item sidebar-nav-overview hty-icon-button" data-target="site-overview-wrap" title="站点概览"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-passport-line"></use></svg></li></ul><div class="sidebar-panel" id="site-overview-wrap"><div class="site-info fix-top"><a class="site-author-avatar" href="/about/" title="呆航"><img width="96" loading="lazy" src="/images/avatar.png" alt="呆航"><span class="site-author-status" title="Looking for dawn.">🌑</span></a><div class="site-author-name"><a href="/about/">呆航</a></div><span class="site-name">呆航的小站</span><sub class="site-subtitle">All at sea.</sub><div class="site-desciption">希望能成为一个有趣的人</div></div><nav class="site-state"><a class="site-state-item hty-icon-button icon-home" href="/" title="首页"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-home-4-line"></use></svg></span></a><div class="site-state-item"><a href="/archives/" title="归档"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-archive-line"></use></svg></span><span class="site-state-item-count">42</span></a></div><div class="site-state-item"><a href="/categories/" title="分类"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-folder-2-line"></use></svg></span><span class="site-state-item-count">2</span></a></div><div class="site-state-item"><a href="/tags/" title="标签"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-price-tag-3-line"></use></svg></span><span class="site-state-item-count">9</span></a></div><a class="site-state-item hty-icon-button" target="_blank" rel="noopener" href="https://yun.yunyoujun.cn" title="文档"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-settings-line"></use></svg></span></a></nav><hr style="margin-bottom:0.5rem"><div class="links-of-author"><a class="links-of-author-item hty-icon-button" rel="noopener" href="tencent://message/?uin=827821562&amp;site=qq&amp;menu=yes" title="QQ" target="_blank" style="color:#12B7F5"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-qq-line"></use></svg></a></div><hr style="margin:0.5rem 1rem"><div class="links"><a class="links-item hty-icon-button" href="/links/" title="我的小伙伴们" style="color:dodgerblue"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-genderless-line"></use></svg></a></div><br><a class="links-item hty-icon-button" id="toggle-mode-btn" href="javascript:;" title="Mode" style="color: #f1cb64"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-contrast-2-line"></use></svg></a></div><div class="sidebar-panel sidebar-panel-active" id="post-toc-wrap"><div class="post-toc"><div class="post-toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#php"><span class="toc-number">1.</span> <span class="toc-text">php</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#SSL%E8%AF%81%E4%B9%A6"><span class="toc-number">2.</span> <span class="toc-text">SSL证书</span></a></li></ol></div></div></div></aside><main class="sidebar-translate" id="content"><div id="post"><article class="hty-card post-block" itemscope itemtype="https://schema.org/Article"><link itemprop="mainEntityOfPage" href="http://lqh827821562.gitee.io/%E9%98%BF%E9%87%8C%E4%BA%91%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%85%8D%E7%BD%AE%E7%BD%91%E9%A1%B5%E6%95%99%E7%A8%8B/"><span hidden itemprop="author" itemscope itemtype="https://schema.org/Person"><meta itemprop="name" content="呆航"><meta itemprop="description"></span><span hidden itemprop="publisher" itemscope itemtype="https://schema.org/Organization"><meta itemprop="name" content="呆航的小站"></span><header class="post-header"><h1 class="post-title" itemprop="name headline">阿里云云服务器配置网页教程</h1><div class="post-meta"><div class="post-time" style="display:block"><span class="post-meta-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-calendar-line"></use></svg></span> <time title="创建时间：2021-10-28 12:32:38" itemprop="dateCreated datePublished" datetime="2021-10-28T12:32:38+08:00">2021-10-28</time><span class="post-meta-divider">-</span><span class="post-meta-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-calendar-2-line"></use></svg></span> <time title="修改时间：2021-11-16 22:48:50" itemprop="dateModified" datetime="2021-11-16T22:48:50+08:00">2021-11-16</time></div><span class="post-count"><span class="post-symbolcount"><span class="post-meta-item-icon" title="本文字数"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-file-word-line"></use></svg></span> <span title="本文字数">975</span><span class="post-meta-divider">-</span><span class="post-meta-item-icon" title="阅读时长"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-timer-line"></use></svg></span> <span title="阅读时长">3m</span></span></span><span class="post-busuanzi"><span class="post-meta-divider">-</span><span class="post-meta-item-icon" title="阅读次数"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-eye-line"></use></svg> <span id="busuanzi_value_page_pv"></span></span></span><div class="post-classify"><span class="post-tag"><a class="tag-item" href="/tags/problem/" style="--text-color:royalblue"><span class="post-meta-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-price-tag-3-line"></use></svg></span><span class="tag-name">problem</span></a></span></div></div></header><section class="post-body" itemprop="articleBody"><div class="post-content markdown-body" style="--smc-primary:#0078E7;"><p>阿里云有新人优惠，刚注册的账号租用服务器一年才不到100元，正好拿来部署一下个人网页<br>操作系统：ubuntu<br>先用SecureCRT(只要是远程链接就行，Xshell等也可以用)远程连接上服务器<br>##下载apache<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/5qaSHK"><img src="https://z3.ax1x.com/2021/10/28/5qaSHK.png" alt="5qaSHK.png" loading="lazy"></a><br>好像不能直接安装httpd,那么先安装apache2试试<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/5qdBo8"><img src="https://z3.ax1x.com/2021/10/28/5qdBo8.png" alt="5qdBo8.png" loading="lazy"></a><br>这个错误时因为libgd3出了点问题，使用命令<code>apt-get --fix-broken install</code> 结果又报错了<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/5qd2yn"><img src="https://z3.ax1x.com/2021/10/28/5qd2yn.png" alt="5qd2yn.png" loading="lazy"></a><br>经过查询后找到错误原因，是因为libpng12-0不被支持但是又必须安装，<br>解决方法，先<a href="libpng12.so.0">下载</a>然后放到服务器中，使用命令<code>cp libpng12.so.0 /lib/x86_64-linux-gnu/</code>把libpng12.so.0放入到系统库中，紧接着使用<code>vim var/lib/dpkg/status</code>修改dpkg依赖状态<br>找到包libgd3，我的大概在5700行左右<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/5LQ3fx"><img src="https://z3.ax1x.com/2021/10/28/5LQ3fx.png" alt="5LQ3fx.png" loading="lazy"></a><br>然后修改depend，把libpng12-0改为 libpng16-16 (&gt;= 1.6.2-1)，保存，接着使用<code>apt-get upgrade</code>更新一下，就可以开始安装了<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/5LQ4Nn"><img src="https://z3.ax1x.com/2021/10/28/5LQ4Nn.png" alt="5LQ4Nn.png" loading="lazy"></a><br>使用<code>apt-get install apache2</code>安装<br>安装过程没有出异常了，使用命令<code>/etc/init.d/apache2 start</code>以及<code>systemctl status apache2</code>但是报了这个错，这是80端口被占用，使用<code>lsof -i:80</code>查看哪个进程占用了这个端口，然后使用Kill中断进程<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/5LGlzq"><img src="https://z3.ax1x.com/2021/10/28/5LGlzq.png" alt="5LGlzq.png" loading="lazy"></a><br>在此重启后报了这个错<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/5LGoOf"><img src="https://z3.ax1x.com/2021/10/28/5LGoOf.png" alt="5LGoOf.png" loading="lazy"></a><br>这个问题很好解决，<code>vim /etc/apache2/apache2.conf</code>然后再最后一行添加<code>ServerName localhost:80</code>保存重启apache2<code>service apache2 restart</code><br>现在apache2就搭建好了，紧接着用浏览器访问一下，但是并没有访问到，这是阿里云安全组的缘故，可参考<a target="_blank" rel="noopener" href="https://help.aliyun.com/document_detail/25471.html">阿里云安全组配置</a>增加80和443端口完成后可访问服务器的公网ip来验证<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/5LBSXj"><img src="https://z3.ax1x.com/2021/10/28/5LBSXj.png" alt="5LBSXj.png" loading="lazy"></a><br>出现这个画面则80端口已经可以使用了。</p>
<h2 id="php"><a href="#php" class="headerlink" title="php"></a>php</h2><p><code>apt-get install php</code>下载安装php，接下来安装一下配到的其他模块   </p>
<pre class="language-none"><code class="language-none">apt-get install libapache2-mod-php
apt-get install php7.0-mysql
apt-get install phpmyadmin</code></pre>

<p><a target="_blank" rel="noopener" href="https://imgtu.com/i/5OLxqH"><img src="https://z3.ax1x.com/2021/10/29/5OLxqH.png" alt="5OLxqH.png" loading="lazy"></a><br>然后配置一下apache  </p>
<pre class="language-shell" data-language="shell"><code class="language-shell">vim &#x2F;etc&#x2F;apache2&#x2F;apache2.conf
include &#x2F;etc&#x2F;phpmyadmin&#x2F;apache.conf
AddType application&#x2F;x-httpd-php .php .htm .html
AddDefaultCharset UTF-8</code></pre>
<p><a target="_blank" rel="noopener" href="https://imgtu.com/i/5OOPit"><img src="https://z3.ax1x.com/2021/10/29/5OOPit.png" alt="5OOPit.png" loading="lazy"></a><br>最后重启一下各个服务  </p>
<pre class="language-none"><code class="language-none">service apache2 restart
service php7.0-fpm restart</code></pre>
<p>注意如果上传文件失败，需要给上传目录添加777权限<br>##mysql<br>使用命令<code>apt install mysql-server</code>安装即可<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/5OLqG6"><img src="https://z3.ax1x.com/2021/10/29/5OLqG6.png" alt="5OLqG6.png" loading="lazy"></a><br>##网站移植<br>在服务器中网站的默认部署位置在/var/www/html,先下载一个rz命令，然后将本地原来的网站部署上去，对于rz不能传输文件夹的问题，先压缩，到服务器里再解压</p>
<h2 id="SSL证书"><a href="#SSL证书" class="headerlink" title="SSL证书"></a>SSL证书</h2><p>域名备案刚刚结束，现在可以使用域名解析服务了，但是解析之后部分浏览器会优先使用https协议打开网页，而之前做出的网页是http协议，这就需要配置SSL证书了，<br>首先先取得阿里云的免费SSL证书<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/IWluZR"><img src="https://z3.ax1x.com/2021/11/16/IWluZR.png" alt="IWluZR.png" loading="lazy"></a><br>点击证书选购里面有免费证书，在SSL证书控制台的免费证书中签发免费证书，我们前面使用的是apache，所以在签发后下载apache的SSL证书<br><a target="_blank" rel="noopener" href="https://imgtu.com/i/IWlcLj"><img src="https://z3.ax1x.com/2021/11/16/IWlcLj.png" alt="IWlcLj.png" loading="lazy"></a><br>在服务器中的/etc/apache2建立目录cert<br><code>mkdir /etc/apache2/cert</code><br>把下载的证书解压并且上传到服务器这里我使用的rz命令，如果你没有可以自己根据报错安装一下，<br>接下来下载相关服务,<code>apt-get install openssl</code><br>使用<code>ln -s /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-enabled/000-default-ssl.conf</code>去链接一个软链接到sites-enabled里，修改以下三行分别指向SSL证书的三个文件   </p>
<pre class="language-none"><code class="language-none">SSLCertificateFile 你自定义的路径&#x2F;2_xxx.xxx.xxx.crt
SSLCertificateKeyFile 你自定义的路径&#x2F;3_xxx.xxx.xxx.key
SSLCertificateChainFile 你自定义的路径&#x2F;1_root_bundle.crt
&#96;&#96;&#96; 
然后打开&#96;&#x2F;etc&#x2F;apache2&#x2F;sites-available&#x2F;000-default.conf&#96;,添加以下内容强制使用https打开   </code></pre>
<p>RewriteEngine on<br>RewriteCond   %{HTTPS} !=on<br>RewriteRule   ^(.*)  https://%{SERVER_NAME}$1 [L,R]</p>
<p>```<br>最后重启apache服务即可</p>
</div><div id="reward-container"><span class="hty-icon-button button-glow" id="reward-button" title="打赏" onclick="var qr = document.getElementById(&quot;qr&quot;); qr.style.display = (qr.style.display === &quot;none&quot;) ? &quot;block&quot; : &quot;none&quot;;"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-hand-coin-line"></use></svg></span><div id="reward-comment">如果你认为本篇博客帮助到了你，你可以请我喝个可乐</div><div id="qr" style="display:none;"><div style="display:inline-block"><a href="/images/zhifubao.png"><img loading="lazy" src="/images/zhifubao.png" alt="支付宝" title="支付宝"></a><div><span style="color:#00A3EE"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-alipay-line"></use></svg></span></div></div><div style="display:inline-block"><a href="/images/qq.png"><img loading="lazy" src="/images/qq.png" alt="QQ 支付" title="QQ 支付"></a><div><span style="color:#12B7F5"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-qq-line"></use></svg></span></div></div><div style="display:inline-block"><a href="/images/wechat.png"><img loading="lazy" src="/images/wechat.png" alt="微信支付" title="微信支付"></a><div><span style="color:#2DC100"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-wechat-pay-line"></use></svg></span></div></div></div></div><ul class="post-copyright"><li class="post-copyright-author"><strong>本文作者：</strong>呆航</li><li class="post-copyright-link"><strong>本文链接：</strong><a href="http://lqh827821562.gitee.io/%E9%98%BF%E9%87%8C%E4%BA%91%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%85%8D%E7%BD%AE%E7%BD%91%E9%A1%B5%E6%95%99%E7%A8%8B/" title="阿里云云服务器配置网页教程">http://lqh827821562.gitee.io/%E9%98%BF%E9%87%8C%E4%BA%91%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%85%8D%E7%BD%AE%E7%BD%91%E9%A1%B5%E6%95%99%E7%A8%8B/</a></li><li class="post-copyright-license"><strong>版权声明：</strong>本博客所有文章除特别声明外，均默认采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank" rel="noopener" title="CC BY-NC-SA 4.0 "><svg class="icon"><use xlink:href="#icon-creative-commons-line"></use></svg><svg class="icon"><use xlink:href="#icon-creative-commons-by-line"></use></svg><svg class="icon"><use xlink:href="#icon-creative-commons-nc-line"></use></svg><svg class="icon"><use xlink:href="#icon-creative-commons-sa-line"></use></svg></a> 许可协议。</li></ul></section></article><div class="post-nav"><div class="post-nav-item"><a class="post-nav-prev" href="/%E5%81%9C%E8%BD%A6%E5%9C%BA%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F%E9%A1%B9%E7%9B%AE/" rel="prev" title="停车场管理系统项目"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-arrow-left-s-line"></use></svg><span class="post-nav-text">停车场管理系统项目</span></a></div><div class="post-nav-item"><a class="post-nav-next" href="/pygame%E9%A3%9E%E6%9C%BA%E5%A4%A7%E6%88%98/" rel="next" title="pygame飞机大战"><span class="post-nav-text">pygame飞机大战</span><svg class="icon" aria-hidden="true"><use xlink:href="#icon-arrow-right-s-line"></use></svg></a></div></div></div><div class="hty-card" id="comment"><div id="valine-container"></div><script>Yun.utils.getScript("https://cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js", () => {
  const valineConfig = {"enable":true,"appId":"k8weiJIG9u6tXEjf9jL8pvQN-MdYXbMMI","appKey":"JtLQP97hURfluJNL00DMe8gl","placeholder":"Just go go","avatar":null,"pageSize":10,"visitor":false,"highlight":true,"recordIP":false,"enableQQ":true,"meta":["nick","mail","link"],"el":"#valine-container","lang":"zh-cn"}
  valineConfig.path = "/%E9%98%BF%E9%87%8C%E4%BA%91%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%85%8D%E7%BD%AE%E7%BD%91%E9%A1%B5%E6%95%99%E7%A8%8B/"
  new Valine(valineConfig)
}, window.Valine);</script></div></main><footer class="sidebar-translate" id="footer"><div class="copyright"><span>&copy; 2019 – 2022 </span><span class="with-love" id="animate"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-cloud-line"></use></svg></span><span class="author"> 呆航</span></div><div class="powered"><span>由 <a href="https://hexo.io" target="_blank" rel="noopener">Hexo</a> 驱动 v5.2.0</span><span class="footer-separator">|</span><span>主题 - <a rel="noopener" href="https://github.com/YunYouJun/hexo-theme-yun" target="_blank"><span>Yun</span></a> v1.7.0</span></div><div class="live_time"><span>本博客已萌萌哒地运行</span><span id="display_live_time"></span><span class="moe-text">(●'◡'●)</span><script>function blog_live_time() {
  setTimeout(blog_live_time, 1000);
  const start = new Date('2021-05-17T00:00:00');
  const now = new Date();
  const timeDiff = (now.getTime() - start.getTime());
  const msPerMinute = 60 * 1000;
  const msPerHour = 60 * msPerMinute;
  const msPerDay = 24 * msPerHour;
  const passDay = Math.floor(timeDiff / msPerDay);
  const passHour = Math.floor((timeDiff % msPerDay) / 60 / 60 / 1000);
  const passMinute = Math.floor((timeDiff % msPerHour) / 60 / 1000);
  const passSecond = Math.floor((timeDiff % msPerMinute) / 1000);
  display_live_time.innerHTML = " " + passDay + " 天 " + passHour + " 小时 " + passMinute + " 分 " + passSecond + " 秒";
}
blog_live_time();
</script></div><div id="busuanzi"><span id="busuanzi_container_site_uv" title="总访客量"><span><svg class="icon" aria-hidden="true"><use xlink:href="#icon-user-line"></use></svg></span><span id="busuanzi_value_site_uv"></span></span><span class="footer-separator">|</span><span id="busuanzi_container_site_pv" title="总访问量"><span><svg class="icon" aria-hidden="true"><use xlink:href="#icon-eye-line"></use></svg></span><span id="busuanzi_value_site_pv"></span></span><script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></footer><a class="hty-icon-button" id="back-to-top" aria-label="back-to-top" href="#"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-arrow-up-s-line"></use></svg><svg class="progress-circle-container" viewBox="0 0 100 100"><circle class="progress-circle" id="progressCircle" cx="50" cy="50" r="48" fill="none" stroke="#0078E7" stroke-width="2" stroke-linecap="round"></circle></svg></a><a class="popup-trigger hty-icon-button icon-search" id="search" href="javascript:;" title="搜索"><span class="site-state-item-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-search-line"></use></svg></span></a><script>window.addEventListener("DOMContentLoaded", () => {
  // Handle and trigger popup window
  document.querySelector(".popup-trigger").addEventListener("click", () => {
    document.querySelector(".popup").classList.add("show");
    setTimeout(() => {
      document.querySelector(".search-input").focus();
    }, 100);
  });

  // Monitor main search box
  const onPopupClose = () => {
    document.querySelector(".popup").classList.remove("show");
  };

  document.querySelector(".popup-btn-close").addEventListener("click", () => {
    onPopupClose();
  });

  window.addEventListener("keyup", event => {
    if (event.key === "Escape") {
      onPopupClose();
    }
  });
});
</script><script defer src="https://cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script><script defer src="https://cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js"></script><script defer src="/js/search/algolia-search.js"></script><div class="popup search-popup"><div class="search-header"><span class="popup-btn-close close-icon hty-icon-button"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-close-line"></use></svg></span></div><div class="search-input-container"></div><div class="algolia-results"><div id="algolia-stats"></div><div id="algolia-hits"></div><div class="algolia-pagination" id="algolia-pagination"></div></div></div></div></body></html>